import request from '@/utils/request'



export function listTask(query) {
    return request({
        url: '/matter/listTask',
        method: 'get',
        params: query
    })
}

// 任务认领
export function taskClaim(query) {
    return request({
        url: '/matter/taskClaim',
        method: 'get',
        params: query
    })
}


// 查询【请填写功能名称】列表
export function listMatter(query) {
    return request({
        url: '/matter/index/list',
        method: 'get',
        params: query
    })
}

// 查询【请填写功能名称】详细
export function getMatter(matterId) {
    return request({
        url: '/matter/' + matterId,
        method: 'get'
    })
}
export function getReports(query) {
    return request({
        url: '/matter/getReports',
        method: 'get',
        params: query
    })
}


// 创建事项
export function addMatter(data) {
    return request({
        url: '/matter/add',
        method: 'post',
        data: data
    })
}


// 删除
export function delMatter(data) {
    return request({
        url: '/matter/deleteById',
        method: 'post',
        data: data
    })
}


// 修改
export function updateMatter(data) {
    return request({
        url: '/matter/updateMatter',
        method: 'post',
        data: data
    })
}

//查询
export function queryById(matterId) {
    return request({
        url: '/matter/queryById/' + matterId,
        method: 'get'
    })
}


export function getRelatedIndicatorOrTask(query) {
    return request({
        url: '/matter/getRelatedIndicatorOrTask',
        method: 'get',
        params: query
    })
}

export function dataScopeMatterList(query) {
    return request({
        url: '/matter/matter/dataScopeMatterList',
        method: 'get',
        params: query
    })
}

export function getMatterList(query) {
    return request({
        url: '/matter/getMatterList',
        method: 'get',
        params: query
    })
}


export function getSystemManage(query) {
    return request({
        url: '/matter/getSystemManage',
        method: 'get',
        params: query
    })
}

export function updteIsKeyWork(query) {
    return request({
        url: '/matter/updteIsKeyWork',
        method: 'get',
        params: query
    })
}

export function updateIsFollowed(query) {
    return request({
        url: '/matter/updateIsFollowed',
        method: 'get',
        params: query
    })
}

// 催办
export function addDialog(data) {
    return request({
        url: '/matter/addDialog',
        method: 'post',
        data: data
    })
}

export function dialogList(query) {
    return request({
        url: '/matter/dialogList',
        method: 'get',
        params: query
    })
}

export function getPracticables(query) {
    return request({
        url: '/matter/getPracticables',
        method: 'get',
        params: query
    })
}
export function saveWorkImplementation(data) {
    return request({
        url: '/matter/saveWorkImplementation',
        method: 'post',
        data: data
    })
}
export function saveContentAndColl(data) {
    return request({
        url: '/matter/saveContentAndColl',
        method: 'post',
        data: data
    })
}



export function updateDialog(query) {
    return request({
        url: '/matter/updateDialog',
        method: 'get',
        params: query
    })
}

export function saveWorkReport(data) {
    return request({
        url: '/matter/saveWorkReport',
        method: 'post',
        data: data
    })
}

export function delWorkReportInfo(sid) {
    return request({
        url: '/matter/delWorkReportInfo/' + sid,
        method: 'delete'
    })
}
export function getWorkReportInfo(sid) {
    return request({
        url: '/matter/getWorkReportInfo/' + sid,
        method: 'get'
    })
}

export function getMyMatterPage(params) {
    return request({
        url: '/matter/getMyMatterPage',
        method: 'get',
        params
    })
}

export function matterClaim(params) {
    return request({
        url: '/matter/matterClaim',
        method: 'get',
        params
    })
}

export function getMyDialog(params) {
    return request({
        url: '/matter/getMyDialog',
        method: 'get',
        params
    })
}
